import { createPinia } from 'pinia'

const pinia = createPinia()

export function setupPinia(router) {
  pinia.use(({ store }) => {
    store.$router = router || null
  })
  return pinia
}

export default pinia